import { getMongoRepository,  } from "typeorm";

import { Role_menus } from "../models/RoleMenus";

class RoleMenusService {

  // 根据 role 查找 用户菜单
  async findByRole(role: number) {
    const roleMenusRepository = getMongoRepository(Role_menus);
    return roleMenusRepository.findOne({role})
  }
}

export default new RoleMenusService()